//
//  RMineCell.m
//  Riji
//
//  Created by liujianlong on 2022/8/17.
//

#import "RMineCell.h"
@interface RMineCell()
@end
@implementation RMineCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setType:(RMineCellType)type{
    _type = type;
    switch (type) {
        case RMineCellTypeNormal:
            self.infoIMG.hidden = YES;
            self.info.hidden = YES;
            self.input.hidden = YES;
            self.arrow.hidden = NO;
            self.img.hidden = NO;
            self.nameLeft.constant = 10;
            break;
        case RMineCellTypeAvatar:
            self.infoIMG.hidden = NO;
            self.info.hidden = YES;
            self.input.hidden = YES;
            self.arrow.hidden = NO;
            self.img.hidden = YES;
            self.nameLeft.constant = -20;
            break;
        case RMineCellTypeInput:
            self.infoIMG.hidden = YES;
            self.info.hidden = YES;
            self.input.hidden = NO;
            self.arrow.hidden = NO;
            self.img.hidden = YES;
            self.nameLeft.constant = -20;
            self.input.placeholder = LS(@"请输入");
            break;
        case RMineCellTypeInfo:
            self.infoIMG.hidden = YES;
            self.info.hidden = NO;
            self.input.hidden = YES;
            self.arrow.hidden = NO;
            self.img.hidden = YES;
            self.nameLeft.constant = -20;
            break;
        case RMineCellTypeNoArrow:
            self.infoIMG.hidden = YES;
            self.info.hidden = NO;
            self.input.hidden = YES;
            self.arrow.hidden = YES;
            self.img.hidden = YES;
            self.nameLeft.constant = -20;
            self.infoRight.constant = -8;
            break;
        default:
            break;
    }
}
@end
